﻿using Common.Attributes;
using Domain.Entities.Organizations;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace Application.Features.Organizations.DTOs;

/// <summary>
/// 组织机构
/// </summary>
[Map(typeof(Organization))]
public class OrganizationOutput
{
    /// <summary>
    /// 唯一标识
    /// </summary>
    [Description("唯一标识")]
    public long Id { get; set; }

    /// <summary>
    /// 唯一标识
    /// </summary>
    [Description("唯一标识")]
    public long OrganizationId
    {
        get
        {
            return Id;
        }
    }

    /// <summary>
    /// 组织机构名称
    /// </summary>
    [Description("组织机构名称")]
    public string? OrganizationName { get; set; }

    /// <summary>
    /// 手机号码
    /// </summary>
    [Description("手机号码")]
    public string? PhoneNumber { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    [Description("邮箱")]
    public string? Email { get; set; }


    /// <summary>
    /// 排序
    /// </summary>
    [Description("排序")]
    public int Sort { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    [Description("描述")]
    public string? Description { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    [Description("状态")]
    public bool? IsActive { get; set; }

    /// <summary>
    /// 上级节点
    /// </summary>
    [Description("上级节点")]
    public long? ParentId { get; set; } = null;

    [Description("创建时间")]
    public DateTime? Created { get; set; }

    /// <summary>
    /// 并发标记
    /// </summary>
    [Required(ErrorMessage = "并发标记必填的")]
    public string ConcurrencyStamp { get; set; }
}
